<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="all_order_content">
                {% for order in orders %}
                    <span>订单时间：</span><span>{{ order.ordertime }}</span>
                    <div class="order_detail">

                        <div class="order_name_img">
                            <img class="order_img" src="{{ order.goods.index_image_url }}" alt=""/>
                            <span class="order_title">{{ order.goods.title }}</span>
                        </div>
                        <div class="order_num">
                            <span>x</span><span>{{ order.count }}</span>
                        </div>
                        <div class="order_peoper">
                            <span>{{ order.user.name }}</span>
                        </div>
                        <div class="order_total_price">
                            <span>¥</span><span>{{ order.total_money }}</span>
                        </div>
                        <div class="order_status">
                            {% if order.state == 0 %}
                                <span>待支付</span>
                                <span class="order_id" hidden>{{ order.id }}</span>
                                <button class="pay">去支付</button>
                            {% elif order.state == 1 %}
                                <span>待收货</span>
                                <button class="sure">确认收货</button>
                            {% else %}
                                <span>已完成</span>
                            {% endif %}
                        </div>
                    </div>
                {% endfor %}
                当前页数：{{ paginate.page }}
                总页数：{{ paginate.pages }}
                一共有{{ paginate.total }}条数据
                {% if paginate.has_prev %}
                    <a href="{{ url_for('order.demo') }}?page={{ paginate.prev_num }}">上一页</a>
                {% endif %}
                页码：
                {% for i in paginate.iter_pages() %}
                    <a href="{{ url_for('order.demo') }}?page={{ i }}">{{ i }}</a>
                {% endfor %}

                {% if paginate.has_next %}
                    <a href="{{ url_for('order.demo') }}?page={{ paginate.next_num }}">下一页</a>
                {% endif %}


            </div>
</body>
</html>